package graph_viewer.structure;

import java.util.ArrayList;

/**
	This class represent papers of IEEE_InfoVis.
*/
public class  IEEE_Infovis_Paper{	
	private String			the_id, the_title, the_source, the_year;
	private ArrayList		
		the_authors,
		the_keywords, 
		the_references;	    // a list of id's of reference

	private String the_topic;
	
	static final public String[] INFOVIS_REF = 
						{
							"acm857191",
							"acm580582",
							"acm375213",
							"acm857189",
							"acm647341",
							"acm857188",
							"acm857187",
							"acm857186"
						};

	static final String
		DATAMINING		=	"Visual Data Mining",
		SYSTEM			=	"System Design",
		WEB				=	"Web Data",
		INTERACTION		=	"Interaction",
		GRAPH				=	"Graph Visualisation",
		FOCUS_CONTEXT	=	"Focus+Context",
		SOFTVIS			=	"Software Visualisation",
		HIERARCHY			=	"Hierarchy",
		MULTIDIMENSION	=	"Multidimensional",
		TREE				=	"Tree",
		INFORETRIEVAL		=	"Information Retrieval";

	static final public String[]	TOPICS	= {	
						DATAMINING,
						SYSTEM,
						WEB,
						INTERACTION,
						GRAPH,
						FOCUS_CONTEXT,
						SOFTVIS,
						HIERARCHY,
						MULTIDIMENSION,
						INFORETRIEVAL
						};
	static final public int
		START_YEAR	= 1995,
		END_YEAR		= 2002;

	public IEEE_Infovis_Paper(){
		the_id		= "";
		the_title		= "";
		the_source	= "";
		the_year		= "";
		the_topic	="";
		the_authors		= new ArrayList();
		the_keywords	= new ArrayList();
		the_references	= new ArrayList();
	}
	
	//============================================================================
	// public interface
	//============================================================================
	public void add_an_author( String an_author ){
		this.the_authors.add( an_author );
	}

	public void add_a_reference( String an_reference ){
		this.the_references.add( an_reference );
	}

	public void add_a_keyword( String a_keyword ){
		this.the_keywords.add( a_keyword );
	}

	public String toString(){
		StringBuffer sb = new StringBuffer();

		sb.append( "id: " + get_id() + "\n" );
		sb.append( "title: " + get_title() + "\n" );
		sb.append( "topic: " + get_topic() + "\n" );
		sb.append( "year: " + get_year() + "\n" );
		sb.append( "authors: " + get_authors() + "\n" );
		sb.append( "references: " + get_references() + "\n" );
		
		return sb.toString();
	}
       	//============================================================================
	// setter & getter
	//============================================================================
	public void set_id( String a_id ){
		this.the_id	= a_id;
	}

	public String get_id(){
		return this.the_id;
	}

	public void set_title( String a_title ){
		this.the_title	= a_title;
	}

	public String get_title(){
		return this.the_title;
	}

	public void set_source( String a_source ){
		this.the_source	= a_source;
	}

	public String get_source(){
		return this.the_source;
	}

	public void set_topic( String a_topic ){
		this.the_topic	= a_topic;
	}

	public String get_topic(){
		return this.the_topic;
	}

	public void set_year( String a_year ){
		this.the_year	= a_year;
	}

	public String get_year(){
		return this.the_year;
	}

	public void set_authors( ArrayList an_author_list ){
		this.the_authors	= an_author_list;
	}

	public ArrayList get_authors(){
		return this.the_authors;
	}

	public void set_keywords( ArrayList a_keyword_list ){
		this.the_keywords	 = a_keyword_list;
	}

	public ArrayList get_keywords(){
		return this.the_keywords;
	}

	public void set_references( ArrayList a_reference_list ){
		this.the_references	= a_reference_list;
	}

	public ArrayList get_references(){
		return this.the_references;
	}    	
}	      